﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Laboration1_uppgift1_3.View
{
    public class Camera
    {


        private int sizeOfTile = 64;
        private int borderSize = 64;

        /// <summary>
        /// Konvertera till från logiska till visuella koordinater
        /// </summary>
        public Point Assignment1(Point piece)
        {
            return new Point { X = borderSize + piece.X * sizeOfTile, Y = borderSize + piece.Y * sizeOfTile };
        }



        /// <summary>
        /// Uppgift 2
        /// </summary>
        public Point Assignment2(Point piece)
        {
            return new Point
            {
                X = (sizeOfTile * 8 + borderSize - sizeOfTile) - (piece.X * sizeOfTile),
                Y = (sizeOfTile * 8 + borderSize - sizeOfTile) - (piece.Y * sizeOfTile)
            };
        }


        /// <summary>
        /// Uppgift 3 - skalning
        /// </summary>
        /// <param name="piece"></param>
        /// <returns></returns>
        public Point Assignment3(Point piece)
        {
            borderSize = 16;
            sizeOfTile = 16;
            return new Point { X = borderSize + piece.X * sizeOfTile, Y = borderSize + piece.Y * sizeOfTile };
        }

    }
}
